package pl.register.android.database.tables;

/**
 * @author Mateusz Strzelecki
 * @since 2013-04-14
 */

public class ProgramInGroupDBTable {
    private static final String SEPARATOR = ".";
    public static final String TABLE_NAME = "ProgramInGroup";

    public static final String CLASSES_DATE_IN_MS = "classes_date_in_ms";
    public static final String HOMEWORK_DATE_IN_MS = "homework_date_in_ms";
    public static final String TAG = "program_tag";
    public static final String FK_STUDENT_GROUP_ID = "program_in_group_fk_student_group_id";
    public static final String FK_LESSON_PROGRAM_ID = "program_in_group_fk_lesson_program_id";

    public static final String PROGRAMINGROUP_CLASSES_DATE_IN_MS = TABLE_NAME + SEPARATOR + CLASSES_DATE_IN_MS;
    public static final String PROGRAMINGROUP_HOMEWORK_DATE_IN_MS = TABLE_NAME + SEPARATOR + HOMEWORK_DATE_IN_MS;
    public static final String PROGRAMINGROUP_TAG = TABLE_NAME + SEPARATOR + TAG;
    public static final String PROGRAMINGROUP_FK_STUDENT_GROUP_ID = TABLE_NAME + SEPARATOR + FK_STUDENT_GROUP_ID;
    public static final String PROGRAMINGROUP_FK_LESSON_PROGRAM_ID = TABLE_NAME + SEPARATOR + FK_LESSON_PROGRAM_ID;

    public interface Query {
        public static final String CREATE_TABLE =
                "CREATE TABLE IF NOT EXISTS " + TABLE_NAME +
                        "(" +
                        CLASSES_DATE_IN_MS + " INTEGER, " +
                        HOMEWORK_DATE_IN_MS + " INTEGER, " +
                        TAG + " TEXT NOT NULL, " +
                        FK_STUDENT_GROUP_ID + " INTEGER NOT NULL, " +
                        FK_LESSON_PROGRAM_ID + " INTEGER NOT NULL" +
                        ");";

        public static final String DROP_TABLE =
                "DROP TABLE IF EXISTS " + TABLE_NAME + ";";
    }

}